package org.tmad.ocms.dao;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

import org.apache.log4j.Logger;
import org.tmad.ocms.log.LogFactory;

public class ForgotpasswordDAO {
	@SuppressWarnings("unused")
	private static Logger logger = LogFactory.getLogger();
	Connection con = null;

	public boolean forgotPassword(String username, String pwd) throws Exception {
		boolean result = false;

		con = ConnectionManager.getDbConnection();
		Statement stmt = con.createStatement();
		ResultSet results = stmt
				.executeQuery("update volunteer set password='"+pwd+"' where email_id='"+username+"'");	
		while (results.next()) {
			result = true;
		}
		return result;
	}

}
